<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'myForm.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<form:form commandName="preferences">
		<table>
			<tr>
				<td>Subscribe to newsletter?:</td>
				<td><form:checkbox path="receiveNewsletter" /></td>
			</tr>
			<tr>
				<td>Interests:</td>
				<td>Quidditch: <form:checkbox path="interests" value="Quidditch" /> Herbology: <form:checkbox path="interests" value="Herbology" /> Defence Against the Dark Arts: <form:checkbox path="interests" value="Defence Against the Dark Arts" />
				</td>
			</tr>
			<tr>
				<td>Favourite Word:</td>
				<td>Magic: <form:checkbox path="favouriteWord" value="Magic" />
				</td>
			</tr>
			<tr>
				<td>Sex:</td>
				<td>Male: <form:radiobutton path="sex" value="1"/> <br/>
				Female: <form:radiobutton path="sex" value="0"/> </td>
			</tr>
			<tr>
				<td>Status:${preferences.status.toString()}</td>
				<td>Enable: <form:radiobutton path="status" value="ENABLE"/> <br/>
				Disable: <form:radiobutton path="status" value="DISABLE"/> </td>
			</tr>
		</table>
		<input type="submit" value="submit" />
	</form:form>
	<form method="post" >
		Q<input name="favouriteWord" type="checkbox" value="QQQQ"/>
		<input name="_favouriteWord" type="hidden" value="on"/>
		
		X<input name="interests" type="checkbox" value="XXXXX"/>
		<input type="submit" value="submit" />
	</form>
	
	
	
</body>
</html>
